﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="Test.aspx.cs" Inherits="SBACN.WebSite.Test" %>

<%@ Register Src="UC/Navigator.ascx" TagName="Navigator" TagPrefix="uc2" %> 
<%@ Register Src="UC/Menu.ascx" TagName="Menu" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
   <script type="text/javascript">
   	debugger;
   	alert(window.history.lenth);
   </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <!--主内容区-->

    <div id="wrapper"> <uc3:Menu ID="Menu1" runat="server" />
        <uc2:Navigator ID="Navigator1" runat="server" />
        <!--左边栏--> 
        <!--左边栏-->
        <div id="container_r">
            <div id="pic_box">
                <img src="../images/mem_img.jpg" width="756" height="126" /></div>
            <div id="main_rbox">
                <table cellpadding="5" cellspacing="5" border="0" align="left" id="tblForm">
                    <tr>
                        <td align="right">
                            标题：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_title" runat="server" Width="400px" CssClass="input1 required"></asp:TextBox>
                            <font color="red">*</font>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblContent" runat="server" Text="留言内容"></asp:Label>：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_Complain" runat="server" TextMode="MultiLine" Width="500px"
                                CssClass="textfield required"></asp:TextBox>
                            <font color="red">*</font>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            验证码：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_valid" runat="server" CssClass="input1 required"></asp:TextBox>
                            <font color="red">*</font>
                            <img id="getcode" alt="" src="ValidationImage.aspx?sn=Message">&nbsp;&nbsp;<a href="javascript:getimgcode()">刷新验证码</a>
                            <asp:Label ID="lblValid" runat="server" ForeColor="Red" Visible="false" Text="验证码输入不正确！"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="left" style="padding-left: 200px">
                            <asp:Button ID="btnSave" runat="server" Text="提交" CssClass="btnsearch" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input id="btnCannel" type="button" value="取消" class="btnsearch" onclick="javascript:history.go(-1);" />
                        </td>
                    </tr>
                </table>
                <div id="submit_ok" style="display: none; padding-top: 100px;" align="center">
                    <img src="images/ok_icon.png" width="32" height="32" />您的留言已成功提交，我们会尽快进行处理并回复 !</div>
            </div>
        </div>
        <!--右边栏-->
    </div>
    <div style="clear: both;">
    </div>

     <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script src="Scripts/messages_cn.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        $(document).ready(function () {
            //添加验证 
            $('#<%=btnSave.ClientID %>').click(function () {
                if (!$("#form1").valid()) {
                    return false;
                }
            });
        });

        function ShowMessage() {
            window.document.getElementById("tblForm").style.display = "none";
            window.document.getElementById("submit_ok").style.display = "";

           }
           

        function getimgcode() {
            var randomnum = Math.random();
            var getimagecode = document.getElementById("getcode");
            getimagecode.src = "ValidationImage.aspx?sn=Message&" + randomnum;
        }
    </script>
</asp:Content>
